public class Threaddemo5 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(()-> {
            int i = 0;
            while(i < 100) {
                System.out.println(i);
                i++;
            }
            System.out.println("t 线程结束！");
        });
        t.start();
        t.join();
        System.out.println("main 线程结束！");
    }
}
